<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>

    //为了将普通函数和生成对象的函数区分开，出现了构造函数的概念
    function createMovie(movieName,type,rate,showTime){
        var movieobj = {};
        movieobj.movieName = movieName;
        movieobj.type = type;
        movieobj.rate = rate;
        movieobj.showTime = showTime;
        movieobj.getNextShowing = function(){
            var current = 11;
            for(var i = 0;i < movieobj.showTime.length ; i++){
                if(current < paresInt(movieobj.showTime[i])){
                    console.log("下次播放实现：" + movieobj.showTime[i]);
                }
            }
            
        }
        return movieobj;
    }


    var movie1 = createMovie("0007","动作",9.0,["9:00","15:00"]);
    var movie2 = createMovie("指环王","动作",9.5,["10:00","11:00"]);
    console.log(movie1);
    console.log(movie2);
</script>
</html>